<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.3/dist/jquery.min.js"></script>
</head>

<body>
    <input type="text" class="box" />
    <div class="text">
        <div>
</body>
<script>
    $(()=>{
        console.log(window.amd)
    })
    const div = $('.text')
    const input = $('.box').on('input', (e) => {
        obj.value = e.target.value
    })
    const obj = {
        value: 123
    }
    const now = {
        ...obj
    }
    for (const key in obj) {
        Object.defineProperty(obj, key, {
            configurable: true,
            enumerable: true,
            get(value) {
                div.text(now[key])
                input.val(now[key])
                return now[key]
            },
            set(value) {
                div.text(value)
            }
        })
    }
    console.log(obj.value)
</script>

</html>